<?php
//
// +------------------------------------------------------------------------+
// | PHP Version 5.4                                                        |
// +------------------------------------------------------------------------+
// | Copyright (c) All rights reserved.                                     |
// +------------------------------------------------------------------------+
// | 世纪车来车往(北京）网络科技有限公司 版权所有！                               |
// | TEL:010-63732365  HOTLINE:400-6688-365  EMAIL:clcw@clcw.com.cn         |
// | $Revision: 1.0 $                                                       |
// +------------------------------------------------------------------------+
// | Author: xiangminghu@clcw.com.cn                                        |
// +------------------------------------------------------------------------+
//

namespace AuctionCore\AntNest;


class Pay extends Client
{
    public function __construct()
    {
        $this->urlPath = 'paycenter/trade/';
    }

    /**
     * 退款
     *
     * @param $pay_no
     * @param $trade_no
     * @param $refund_notice_url
     * @param $reason
     *
     * @return bool
     */
    public function refund($pay_no, $trade_no, $refund_notice_url, $reason)
    {
        $this->urlPath = $this->urlPath . "refund";
        $this->params = [
            'pay_no' => $pay_no,
            'trade_no' => $trade_no,
            'map_refund_notice_url' => $refund_notice_url,
            'map_refund_reason' => $reason
        ];
        return $this->getData();
    }

}